# Maintainer: Luca Weiss <luca@z3ntu.xyz>
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Contributor: Antoni Aloy <aaloytorrens@gmail.com>
pkgname=lomiri-settings-components
pkgver=1.1.0
pkgrel=0
pkgdesc="Lomiri settings Components"
arch="all"
url="https://gitlab.com/ubports/development/core/lomiri-settings-components"
license="GPL-3.0-only AND LGPL-3.0-only"
makedepends="
	cmake
	cmake-extras
	qt5-qtdeclarative-dev
	samurai
	"
source="https://gitlab.com/ubports/development/core/lomiri-settings-components/-/archive/$pkgver/lomiri-settings-components-$pkgver.tar
	qmltestrunner.patch
	"
subpackages="$pkgname-lang"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=ON \
		-DCMAKE_BUILD_TYPE=None
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
09d17e3c3c6435b5e5bb3f283af63f577661eb1b51bd381ebbaa16331b3d6f2320d8539b95855ccd06938cfbf825bd411acb9bc9e67dff3e8ad7a2ba3167d4b7  lomiri-settings-components-1.1.0.tar
0cbe24ba24468ccfae80b6d6b49c68b55e44561ac7914645746af15ee252c12341f2b401390cffbed520963d1cb7da6980f99520ee820528de964b8a714b87b4  qmltestrunner.patch
"
